@leftBubbleColor: #d9f7be;
@rightBubbleColor: #fff;

.bubble-wrapper {
  display: flow-root;
  position: relative;
  width: 100%;

  .bubble {
    position: relative;
    padding: 10px 12px;
    border-radius: 6px;
    max-width: 70%;
    line-height: 22px;
  }

  .name {
    margin-bottom: 3px;
    font-size: 12px;
    color: #ddd;
    line-height: 12px;
    vertical-align: top;
  }

  .arrow {
    content: '';
    display: block;
    position: absolute;
    top: 16px;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
  }

  &.bubble-left {
    .avatar {
      float: left;
      margin-right: 15px;
    }

    .bubble {
      float: left;
      background-color: @leftBubbleColor;
    }

    .arrow {
      left: -8px;
      border-right: 8px solid @leftBubbleColor;
    }
  }

  &.bubble-right {
    .avatar {
      float: right;
      margin-left: 15px;
    }

    .name {
      display: none;
    }

    .bubble {
      float: right;
      background-color: @rightBubbleColor;
    }

    .arrow {
      right: -8px;
      border-left: solid 8px @rightBubbleColor;
    }
  }
}
